/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.registration.core;

import com.registration.Persistent;

/**
 *
 * @author giovanella
 * @date Sep 8, 2014
 */
public class PaymentMethod implements Persistent {
    private Long id;
    private String name;
    private boolean active = true;

    public PaymentMethod() {
    }
    
    public PaymentMethod(String name) {
        this.name = name;
    }


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public boolean isActive() {
        return active;
    }

    public void setActive(boolean active) {
        this.active = active;
    }     
    
    @Override
    public int hashCode() {
        return id.hashCode();
    }

    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof PaymentMethod)) {
            return false;
        }
        PaymentMethod _i = (PaymentMethod) other;
        return id != null ? id.equals(_i.id) : false;
    }
    
}
